package com.taa.domain.trade.service.discount.impl;

import com.taa.domain.trade.service.discount.IDiscountStrategy;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

/**
 * @Author: taa
 * @Desc: 折扣策略
 * @Create: 2025-06-01 19:19
 **/
@Component("ZK")
public class ZKDiscountStrategy implements IDiscountStrategy {

    @Override
    public String getStrategyType() {
        return "ZK";
    }

    @Override
    public BigDecimal calculate(BigDecimal originalPrice, String strategyValue) {
        return originalPrice.multiply(new BigDecimal(strategyValue));
    }
}

